import request from '@/utils/request'

// 获取可选择管理设备列表
export function listSelect(query) {
	return request({
		url: '/api/devices/ranges',
		method: 'get',
		params: query
	})
}

// 详情
export function detail(query) {
	return request({
		url: '/api/devices/'+query.id,
		method: 'get'
	})
}


// 获取塘口指定大分类下的设备
export function getPondDeviceByCategory(params) {
	return request({
		url: '/api/devices/pond/category',
		method: 'get',
		params
	})
}

/**
 * 获取相机相关信息
 */
export function getCameraDevice(params){
	return request({
		url: '/api/app/device/camera',
		method: 'get',
		params
	})
}

/**
 * 获取相机相关信息
 */
export function getCameraDeviceDetail(params){
	return request({
		url: '/api/app/device/camera/detail',
		method: 'get',
		params
	})
}


/**
 * 获取相机相关信息
 */
export function getKeepCameraLive(params){
	return request({
		url: '/api/app/device/camera/play',
		method: 'get',
		params
	})
}

/**
 * 相机控制
 */
export function cameraPtz(params){
	return request({
		url: '/api/app/device/camera/ptz',
		method: 'get',
		params
	})
}

/**
 * 获取塘口设备相关信息
 */
export function getDeviceDetail(params){
	return request({
		url: '/api/app/device/detail',
		method: 'get',
		params
	})
}